## Abstract

The design and construction of a Combination Wave Generator with a 1000 V,
500 A output in accordance with IEC 61000-4-5 is explained. Sometimes
known as a lightning surge generator, it's designed to
test surge protection devices and circuits. In contrary to
other unsuitable non-standard circuits commonly used among high-voltage
enthusiasts - such as camera photoflashes, coil-gun launchers, or the
so-called “USB Killers” - this design is appropriate for use under
laboratory conditions by generating the standard "1.2/50-8/20 μs" test
waveform, which is widely used in internationally and in the industry.

To maximize the reproducibility of the circuit, 99% of this design
uses off-the-shelf parts (with the exception of two hand-winded coils),
and can be constructed for $200. For circuit designers who wish to
evalutate a few part, it's a practical alternative to full-sized generators
with a $1000 to $10,000 price tag.

## Introduction

In an electrical installation, disruptive surges can appear on power and
data lines. Their sources include abrupt load switching and faults in
the power system, as well as induced lightning transients from an
indirect lightning strike. Thus, the use of surge protection circuits
is necessary for many power supplies and data interfaces.
These circuits are constructed based on based on Transient Voltage
Suppressors (TVS), Gas Discharge Tubes (GDT), Metal Oxide Varistors (MOV),
and other components.

To evaluate the surge rating and effectiveness of surge protectors.
random capacitor-discharge circuits popular among high-voltage enthusiasts
are unsuitable
for laboratory testing. Although they fundamentally follow the same
theory of operation, due to their poorly-controlled nature and the
use of unrealistically-high energy output, they often only create a loud
"bang" with rarely any insightful engineering data. Examples of these
unsuitable circuits include camera photoflashes, coil-gun launchers, or
the so-called "USB Killers".

Simulating surges in a consistent and repeatable manner requires the
use of a standard impulse generator as defined international in
IEC 61000-4-5. This document standardizes the most widely used
surge waveform in the industry - the "1.2/50-8/20 μs" waveform,
produced using a *Combination Wave Generator*.

Constructing
such a generator is far from simple due to the extreme peak voltage
and current levels, carefully attention must be paid to every aspect
of the design. Hereby, this article describes a downscaled version
of such a generator, capable of testing at Class 2 at 1000 V and 500 A,
including crucial details such as circuit simulation code, component
selection, trimming and calibration, probing and galvanic isolation -
with many pitfalls.

## Disclaimer

The circuits described below are laboratory prototypes and should only
be used by qualified personnel. Because they're not finished products,
common protections such as a interlocked secure container are non-existent.
This design
is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

BEFORE PROCEEDING ANY FURTHER, THE READER
IS WARNED THAT CAUTION MUST BE USED IN THE
CONSTRUCTION, TESTING AND USE OF THE TEXT’S
CIRCUITS. HIGH VOLTAGE, LETHAL POTENTIALS ARE
PRESENT IN THESE CIRCUITS. EXTREME CAUTION
MUST BE USED IN WORKING WITH, AND MAKING
CONNECTIONS TO, THESE CIRCUITS.

REPEAT: THESE CIRCUITS CONTAIN DANGEROUS, HIGH
VOLTAGE POTENTIALS. USE CAUTION.

## Circuit Descriptions

To be written. Too many project, too little time...

For now, use the exact parts as described
in the schematics, and it should work.

## Design and Component Selection

### Pulse Shaping Network

#### Switch Selection

To be explained...

#### Resistor Selection

To be explained...

#### Capacitor Selection

To be explained...

#### Inductor Selection

To be explained...

### HV Power supply

To be explained...

### Crowbar Bias Voltage 

To be explained...

### Galvanic Isolation

To be explained...

## Calibration

To calibrate this circuit up to IEC 61000-4-5's specification...

### Probing

For voltage measurement, you need a high voltage probe (2-kV rating).
For current measurement, you need a current probe (600-amp rating),
a Rogowski current probe with a suitable rating is highly recommended.
I found a suitable "CWT Rogowski Current Transducer" made by PEM UK
for $200 on second-hand market..

If you can't find an affortable Rogowski current, use a 0.01 Ω shunt
resistor with a 1x probe connected across it - use four-wire Kelvin
connection. Convert it to current using 1 V = 100 A. Note that most
resistors are totally unsuitable as shunt resistors (especially
wire-wound types commonly used for pulsed applications) due to
their parasitic inductance. These resistors will seriously distort
the current waveform.

Use surface-mount metal strip (not metal film!) current sense
resistors, such as Vishay WSLT2010R0100FEA18.  These metal strip
resistors can easily handle a 500-amp microsecond pulse while
providing minimum ESL. Make sure to check the resistor is not
open circuit before measuring the voltage across the resistor
with a 1x probe, otherwise you would blow up your oscilloscope.

### Measurement Pitfalls

### Rise Time Headache

Beware that automatic rise time and duration measurements
in the oscilloscope (and any other instrument or computer
programs based on the usual bi-level histogram method
described in the IEEE 181 standard) are unreliable for
impulses and cannot be trusted.

To determine the rise time, first one needs to determine
the peak voltage. Most implementations of IEEE 181 attempts
to calculate a bi-level histogram. It attempts to average the
top and bottom to get the HIGH/LOW voltages. For an impulse,
it makes the peak artificially low and is ill-suited for the
purpose of IEC 61000-4-5.

As a result, a well-calibrated current waveform may appear
to be slightly out of calibration due to this problem. For a
definite test for current waveform, use your own program to
find the 20%-80% rise time, using the actual peak voltage - or
do the same manually use cursor measurement.

In fact, bi-level histogram is not the only algorithm for rise
time measurement in IEEE 181. For an impulse, IEEE 181 explicitly
says you can take its peak value. But I guess everyone just went
with the default - which works well with repetitive signal waveforms,
but not a single-shot impulse.

Similarly, if the current waveform has an undershoot (which
is permitted), the oscilloscope may calculate the rise time
using the wrong ground level distorted by the understood.
This can make the automatic rise time measurement to be
completely wrong.

Historically, the 2nd edition of IEC 61000-4-5 specified a
custom interpolation algorithm to calculate the front time
of the impulse. In the 3rd edition, it was abolished in favor
of standard 10%-90% rise time, allowing people to measure that
by pressing a button on the oscilloscope, instead of writing
code.

But it seems that the standard committee completely ignored
this ambiguity problem of built-in rise time measurement. Good
intention, but it looks like this reformation was misguided and
caused unintended consequences - solving an old problem and
introducing a new one.

Newer oscilloscope

### Incorrect Example 1

The first impulse was measured to have a rise time of 9.58
microseconds, the next waveform was almost the same impulse,
just with its time base shifted. Now rise time suddenly becomes
6.78 microseconds, an error of 40%. What's going on? The
oscilloscope was trying to find the ground offset, the undershoot
following the impulse made the calculation completely wrong.

### Incorrect Example 2

The first impulse has its undershoot truncated off the screen,
the measured rise time was 6.76 microseconds. Now let's shift it
further and also truncate the falling edge too, rise time suddenly
became 7.24 microseconds, an 8% change!

Again, the scope attempted to find the top level by averaging both
sides. But for a short impulse, this averaging is counterproductive
and gives a lower peak value, causing an artificial rise time
reduction.

### Incorrect Example 3

This alleged problem is further proved in Matlab.

Matlab's rise time result matched my oscilloscope within 2 decimal
places, it's a proper IEEE 181 algorithm, and produces this informative
graph.

The problem is exactly what I suspected. The bi-level histogram method
was only suitable for a step function, not an impulse. It attempts to
average the top and bottom to get the HIGH/LOW voltages. For an impulse,
it makes the peak artificially low and is ill-suited for the purpose
of IEC 61000-4-5. 

If the falling edge of the impulse is removed entirely, the rise time
measured by the oscilloscope increases and its value gets closer to the
"correct" answer, since the algorithm is no longer averaging both side to
bring down the peak. And indeed, I can produce the same effect on Matlab,
from 6.75 microseconds to 7.08, a 5% change.

Conclusion: the default 10%-90% rise time algorithm in many oscilloscopes
is unusable for impulse measurement. 
